home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / G-Games / (c)gb.d64 / montana.c (.txt) < prev    next >
Commodore BASIC  |  2007-02-04  |  11KB  |  419 lines

  1. 1 REM PONZO/WATERLOO/1983
  2. 2 :
  3. 4 POKE56,7*16+15:POKE55,0:CLR
  4. 5 DIMC(3,12),CN(3,12),CY(3,12)
  5. 6 PASS=1:CRT=1024:WD=40
  6. 7 GOSUB50000:REM* TITLE
  7. 8 GOSUB10000:REM* INSTRUCTIONS
  8. 9 GOSUB62000:PRINTP$
  9. 10 GOSUB4000:REM* DEFINE CARD CORNERS
  10. 20 GOSUB4100:REM* DRAW CARD OUTLINES
  11. 30 GOSUB2000:REM* DEAL 52 CARDS
  12. 40 GOSUB4200:REM* DELAY
  13. 60 GOSUB4300:REM* REMOVE ACE EXTERIORS
  14. 70 GOSUB4200:REM* DELAY
  15. 80 GOSUB4400:REM* REMOVE ACE INTERIORS
  16. 90 GOSUB4500:REM* CARD TO BE MOVED?
  17. 100 GOSUB200:REM* IDENTIFY CARD CHOSEN
  18. 110 GOSUB4600:REM* FIND CORRECT SPACE
  19. 120 IFQQ=0THEN90:REM* QQ=0? BAD CHOICE
  20. 130 GOSUB280:REM* REMOVE CHOSEN CARD
  21. 140 GOSUB340:REM* INSERT IN SPACE
  22. 150 GOSUB20000:REM*NEXT PASS?..NQ=1
  23. 160 IFNQ=0THEN90
  24. 165 GOTO2300 :REM*CARDS RETAINED?
  25. 170 GOSUB2800:REM* PRINT"NEXT PASS"
  26. 180 GOSUB2500:REM*DEAL FOR NEXT PASS
  27. 190 GOTO40
  28. 200 REM*********************
  29. 201 REM** IDENTIFY CARD: ***
  30. 202 REM** N$=CARD NUMBER ***
  31. 203 REM**    Y$=SUIT     ***
  32. 204 REM*********************
  33. 205 N$=LEFT$(A$,1):Y$=MID$(A$,2,1)
  34. 206 IFN$="2"THENGOSUB3000:GOTO90
  35. 210 IFN$="K"THENK=17:K1=11:GOTO260
  36. 220 IFN$="Q"THENK=10:K1=17:GOTO260
  37. 230 IFN$="J"THENK=20:K1=10:GOTO260
  38. 240 IFN$="T"THENK=57:K1=20:GOTO260
  39. 250 K1=ASC(N$):K=K1-1
  40. 260 RETURN
  41. 278 REM***************************
  42. 279 REM*                         *
  43. 280 REM*  REMOVE CARD SELECTED   *
  44. 281 REM*                         *
  45. 282 REM***************************
  46. 300 FORII=0TO3:FORJJ=0TO12
  47. 310 IFCN(II,JJ)<>K1THEN325
  48. 315 IFCY(II,JJ)<>ASC(Y$)-128THEN325
  49. 320 I=II:J=JJ:A=I:B=J:II=3:JJ=12
  50. 325 NEXT
  51. 326 NEXT
  52. 330 GOSUB500:GOSUB550
  53. 335 CN(I,J)=-1:CY(I,J)=-1:RETURN
  54. 338 REM***************************
  55. 339 REM*                         *
  56. 340 REM*  INSERT CARD SELECTED   *
  57. 341 REM*                         *
  58. 342 REM***************************
  59. 343 I=SI(LL):J=SJ(LL):GOSUB600
  60. 345 SI(LL)=A:SJ(LL)=B
  61. 355 CN(I,J)=K1:CY(I,J)=ASC(Y$)-128
  62. 370 RETURN
  63. 500 REM*******************************
  64. 501 REM*                             *
  65. 502 REM*  REMOVE EXTERIOR OF A CARD  *
  66. 503 REM*                             *
  67. 504 REM*******************************
  68. 505 POKESID+4,17:POKESID+1,20
  69. 510 POKEC(I,J),32:POKEC(I,J)+1,32:POKEC(I,J)+2,32:POKEC(I,J)-WD,32
  70. 520 POKEC(I,J)-WD+2,32:POKEC(I,J)-2*WD,32:POKEC(I,J)-2*WD+2,32
  71. 530 POKEC(I,J)-3*WD,32:POKEC(I,J)-3*WD+1,32:POKEC(I,J)-3*WD+2,32
  72. 535 POKESID+1,0
  73. 540 RETURN
  74. 548 REM*******************************
  75. 549 REM*                             *
  76. 550 REM*  REMOVE INTERIOR OF A CARD  *
  77. 551 REM*                             *
  78. 552 REM*******************************
  79. 555 POKESID+4,33:POKESID+1,10
  80. 560 POKEC(I,J)-2*WD+1,32:POKEC(I,J)-WD+1,32
  81. 565 POKESID+1,0
  82. 570 RETURN
  83. 600 REM*******************
  84. 601 REM*                 *
  85. 602 REM*  INSERT A CARD  *
  86. 603 REM*                 *
  87. 604 REM*******************
  88. 610 GOSUB1000
  89. 620 POKEC(I,J)-2*WD+1,K1:POKEC(I,J)-WD+1,ASC(Y$)-128
  90. 630 RETURN
  91. 1000 REM***********************
  92. 1001 REM*                     *
  93. 1002 REM*  DEAL A BLANK CARD  *
  94. 1003 REM*                     *
  95. 1004 REM***********************
  96. 1010 POKEC(I,J),74:POKEC(I,J)+1,64:POKEC(I,J)+2,75:POKEC(I,J)-WD,93
  97. 1020 POKEC(I,J)-2*WD,93:POKEC(I,J)-WD+2,93:POKEC(I,J)-2*WD+2,93
  98. 1030 POKEC(I,J)-3*WD,85:POKEC(I,J)-3*WD+1,64:POKEC(I,J)-3*WD+2,73
  99. 1040 RETURN
  100. 2000 REM*******************
  101. 2001 REM*                 *
  102. 2002 REM*  DEAL 52 CARDS  *
  103. 2003 REM*                 *
  104. 2004 REM*******************
  105. 2010 C$="2[193]3[193]4[193]5[193]6[193]7[193]8[193]9[193]T[193]J[193]Q[193]K[193]A[193]"
  106. 2020 C$=C$+"2[211]3[211]4[211]5[211]6[211]7[211]8[211]9[211]T[211]J[211]Q[211]K[211]A[211]"
  107. 2030 C$=C$+"2[218]3[218]4[218]5[218]6[218]7[218]8[218]9[218]T[218]J[218]Q[218]K[218]A[218]"
  108. 2040 C$=C$+"2[216]3[216]4[216]5[216]6[216]7[216]8[216]9[216]T[216]J[216]Q[216]K[216]A[216]"
  109. 2045 POKESID+4,17:POKESID+24,15:FORI=0TO3:FORJ=R(I)TO12
  110. 2050 R=2*INT(LEN(C$)*RND(0)/2+1)-1
  111. 2055 POKESID+1,5*(I+1)*J
  112. 2060 N$=MID$(C$,R,1):Y$=MID$(C$,R+1,1)
  113. 2070 IFR>1THENT$=LEFT$(C$,R-1):GOTO2090
  114. 2080 T$=""
  115. 2090 C$=T$+MID$(C$,R+2)
  116. 2100 IFN$="A"THENK=1:GOTO2110
  117. 2101 IFN$="K"THENK=11:GOTO2110
  118. 2102 IFN$="Q"THENK=17:GOTO2110
  119. 2103 IFN$="J"THENK=10:GOTO2110
  120. 2104 IFN$="T"THENK=20:GOTO2110
  121. 2105 K=ASC(N$)
  122. 2110 POKEC(I,J)-2*WD+1,K:POKEC(I,J)-WD+1,ASC(Y$)-128
  123. 2115 CN(I,J)=K:CY(I,J)=ASC(Y$)-128
  124. 2120 NEXT:NEXT:POKESID+1,0:RETURN
  125. 2300 REM******************************
  126. 2301 REM*
  127. 2302 REM* # OF"CORRECT"CARDS/NEXT PASS
  128. 2303 REM*
  129. 2304 REM******************************
  130. 2305 R(0)=0:R(1)=0:R(2)=0:R(3)=0:CJ=0
  131. 2306 IFPASS>TTTHENGOSUB21000:GOTO20070
  132. 2310 FORI=0TO3
  133. 2315 IFCN(I,0)=50THENSU(I)=CY(I,0):GOSUB2400:CJ=CJ+R(I)
  134. 2320 NEXT
  135. 2325 IFCJ=48THEN63130:REM* A WIN!
  136. 2330 P$="PASS"+STR$(PASS)
  137. 2335 P$=P$+" OF"+TT$+"[144]"
  138. 2340 GOTO170
  139. 2400 REM******************************
  140. 2401 REM*
  141. 2402 REM* # OF"CORRECT"CARDS IN ROW  *
  142. 2403 REM*
  143. 2404 REM******************************
  144. 2405 Q=0:R(I)=1
  145. 2410 FORJ=1TO7
  146. 2415 IFCN(I,J)<>CN(I,J-1)+1ORCY(I,J)<>CY(I,J-1)THENJ=7:Q=1:GOTO2425
  147. 2420 R(I)=R(I)+1
  148. 2425 NEXT:J=7:IFQ=1THENRETURN
  149. 2430 IFCN(I,J+1)<>20ORCY(I,J+1)<>CY(I,J)THENRETURN
  150. 2435 R(I)=R(I)+1:J=J+1
  151. 2440 IFCN(I,J+1)<>10ORCY(I,J+1)<>CY(I,J)THENRETURN
  152. 2445 R(I)=R(I)+1:J=J+1
  153. 2450 IFCN(I,J+1)<>17ORCY(I,J+1)<>CY(I,J)THENRETURN
  154. 2455 R(I)=R(I)+1:J=J+1
  155. 2460 IFCN(I,J+1)<>11ORCY(I,J+1)<>CY(I,J)THENRETURN
  156. 2465 R(I)=R(I)+1
  157. 2470 RETURN
  158. 2500 REM**********************
  159. 2501 REM*                    *
  160. 2502 REM* DEAL FOR NEXT PASS *
  161. 2503 REM*                    *
  162. 2504 REM**********************
  163. 2505 C$="":C1=0:C2=0:C3=0:C4=0
  164. 2506 C1$="2[193]3[193]4[193]5[193]6[193]7[193]8[193]9[193]T[193]J[193]Q[193]K[193]A[193]"
  165. 2507 C2$="2[211]3[211]4[211]5[211]6[211]7[211]8[211]9[211]T[211]J[211]Q[211]K[211]A[211]"
  166. 2508 C3$="2[218]3[218]4[218]5[218]6[218]7[218]8[218]9[218]T[218]J[218]Q[218]K[218]A[218]"
  167. 2509 C4$="2[216]3[216]4[216]5[216]6[216]7[216]8[216]9[216]T[216]J[216]Q[216]K[216]A[216]"
  168. 2510 FORI=0TO3
  169. 2515 IFSU(I)=65THENC1=1:GOSUB2550
  170. 2520 IFSU(I)=83THENC2=1:GOSUB2560
  171. 2525 IFSU(I)=90THENC3=1:GOSUB2570
  172. 2530 IFSU(I)=88THENC4=1:GOSUB2580
  173. 2535 NEXT
  174. 2540 IFC1=0THENC$=C$+C1$
  175. 2541 IFC2=0THENC$=C$+C2$
  176. 2542 IFC3=0THENC$=C$+C3$
  177. 2543 IFC4=0THENC$=C$+C4$
  178. 2545 FORI=0TO3:FORJ=R(I)TO12:GOSUB500:GOSUB550:NEXT:NEXT
  179. 2546 GOSUB4100:GOSUB2045:RETURN
  180. 2550 C$=C$+MID$(C1$,2*R(I)+1):RETURN
  181. 2560 C$=C$+MID$(C2$,2*R(I)+1):RETURN
  182. 2570 C$=C$+MID$(C3$,2*R(I)+1):RETURN
  183. 2580 C$=C$+MID$(C4$,2*R(I)+1):RETURN
  184. 2800 REM* PRINT NEXT PASS
  185. 2810 FORI=1TO10:PRINTP1$:POKESID+1,10
  186. 2820 FORK=1TO20:NEXT
  187. 2830 PRINTP$:POKESID+1,150
  188. 2840 FORK=1TO20:NEXT
  189. 2850 NEXT:POKESID+1,0:RETURN
  190. 3000 REM************************
  191. 3001 REM*                      *
  192. 3002 REM*  ROUTINE FOR N$="2"  *
  193. 3003 REM*                      *
  194. 3004 REM************************
  195. 3005 QC=0:WW=0:QN=0
  196. 3006 IFMID$(A$,3,1)="/"THENQC=1:QN=VAL(MID$(A$,4,1))
  197. 3010 FORL=1TO4
  198. 3012 IFSJ(L)<>0THEN3020
  199. 3014 IFQC<>1THEN3018
  200. 3016 IFSI(L)<>QN-1THEN3020
  201. 3018 LL=L:L=4:WW=1
  202. 3020 NEXT
  203. 3025 IFWW=0THENRETURN
  204. 3026 WW=0:I1=SI(LL):J1=SJ(LL)
  205. 3030 FORII=0TO3:FORJJ=0TO12
  206. 3040 IFCN(II,JJ)<>50THEN3070
  207. 3050 IFCY(II,JJ)<>ASC(Y$)-128THEN3070
  208. 3060 I=II:J=JJ:GOSUB500:GOSUB550:II=3:JJ=12
  209. 3070 NEXT
  210. 3071 NEXT
  211. 3075 CN(I,J)=-1:CY(I,J)=-1
  212. 3080 SI(LL)=I:SJ(LL)=J
  213. 3090 CN(I1,J1)=50:CY(I1,J1)=ASC(Y$)-128
  214. 3110 I=I1:J=J1:GOSUB1000
  215. 3120 POKEC(I,J)-2*WD+1,50:POKEC(I,J)-WD+1,ASC(Y$)-128
  216. 3130 RETURN
  217. 4000 REM****************************
  218. 4001 REM*                          *
  219. 4002 REM*  CARD CORNERS IDENTIFIED *
  220. 4003 REM*                          *
  221. 4004 REM****************************
  222. 4010 FORI=0TO3
  223. 4020 FORJ=0TO12
  224. 4030 C(I,J)=CRT+WD*(3+5*I)+J*INT(WD/13)
  225. 4040 NEXT:NEXT:RETURN
  226. 4100 REM*****************
  227. 4101 REM*               *
  228. 4102 REM* CARD OUTLINES *
  229. 4103 REM*               *
  230. 4104 REM*****************
  231. 4145 POKESID+4,17
  232. 4150 FORI=0TO3
  233. 4160 FORJ=R(I)TO12
  234. 4165 POKESID+1,10+100*RND(1)
  235. 4170 GOSUB1000
  236. 4180 NEXT:NEXT
  237. 4185 POKESID+4,0:RETURN
  238. 4200 REM***********
  239. 4201 REM*         *
  240. 4202 REM*  DELAY  *
  241. 4203 REM*         *
  242. 4204 REM***********
  243. 4205 FORDL=1TO10:X=TAN(DL):NEXT
  244. 4210 RETURN
  245. 4300 REM***************
  246. 4301 REM*             *
  247. 4302 REM*  FIND ACES  *
  248. 4303 REM*             *
  249. 4304 REM***************
  250. 4305 L=1
  251. 4310 FORI=0TO3:FORJ=0TO12
  252. 4320 IFCN(I,J)=1THENSI(L)=I:SJ(L)=J:L=L+1:GOSUB500
  253. 4330 NEXT:NEXT:RETURN
  254. 4400 REM**************************
  255. 4401 REM*                        *
  256. 4402 REM*  REMOVE ACE INTERIORS  *
  257. 4403 REM*                        *
  258. 4404 REM**************************
  259. 4410 FORL=1TO4:I=SI(L):J=SJ(L):GOSUB550
  260. 4420 CN(SI(L),SJ(L))=-1:CY(SI(L),SJ(L))=-1:NEXT
  261. 4430 RETURN
  262. 4500 REM****************
  263. 4501 REM*              *
  264. 4502 REM*  NEXT CARD?  *
  265. 4503 REM*              *
  266. 4504 REM****************
  267. 4505 GOSUB63800
  268. 4510 PRINT"";:FORL=1TO23:PRINT"";:NEXT
  269. 4520 INPUT"CARD TO BE MOVED   [214]      [157][157][157][157][157][157][157][157][157]";A$:IFA$="[214]"THEN4500
  270. 4540 PRINT"[144]":RETURN
  271. 4600 REM******************************
  272. 4601 REM*                            *
  273. 4602 REM*  SPACE FOR SELECTED CARD?  *
  274. 4603 REM*                            *
  275. 4604 REM******************************
  276. 4605 QQ=0
  277. 4610 FORL=1TO4:IFSJ(L)=0THEN4650
  278. 4620 IFCN(SI(L),SJ(L)-1)<>KTHEN4650
  279. 4630 IFCY(SI(L),SJ(L)-1)<>ASC(Y$)-128THEN4650
  280. 4640 LL=L:QQ=1:  REM* "L" IS SPACE
  281. 4650 NEXT
  282. 4660 RETURN
  283. 8000 REM******************
  284. 8001 REM*                *
  285. 8002 REM*     FINALE     *
  286. 8003 REM*                *
  287. 8004 REM******************
  288. 8100 PRINT"CONGRATULATIONS!":FORI=0TO15:POKE176,I
  289. 8110 GOSUB63820:FORK=1TO50:NEXT:NEXT:GOSUB63800
  290. 8120 GOTO20070
  291. 10000 REM******************
  292. 10001 REM*                *
  293. 10002 REM*  INSTRUCTIONS  *
  294. 10003 REM*                *
  295. 10004 REM******************
  296. 10005 PRINT:PRINT"[144]           WANT INSTRUCTIONS?"
  297. 10010 GETA$:IFA$=""THEN10010
  298. 10015 PRINT"[147]"
  299. 10020 IFA$<>"Y"THENRETURN
  300. 10050 PRINT"[147]   [144]":POKE53281,15
  301. 10100 PRINT"[209]I DEAL 52 CARDS AND REMOVE THE ACES"
  302. 10200 PRINT" CREATING 4 'SPACES'."
  303. 10300 PRINT"[209]YOU MAY THEN MOVE A CARD INTO A SPACE"
  304. 10400 PRINT" BUT[160]THE CARD YOU MOVE MUST BE THE"
  305. 10500 PRINT" NEXT CARD IN SEQUENCE!"
  306. 10600 PRINT"  (ONLY THE JACK OF CLUBS=J[216] MAY"
  307. 10700 PRINT"  FOLLOW THE TEN OF CLUBS=T[216], ETC.)"
  308. 10800 PRINT"[209]YOU MUST FINALLY GET ONE SUIT TO A ROW"
  309. 10900 PRINT" ALL IN ORDER..2[211] 3[211] 4[211] ETC.ETC."
  310. 11000 PRINT"[209]THE 2'S GO IN THE LEFTMOST SPACES."
  311. 11100 PRINT" IF THERE ARE SEVERAL LEFTMOST SPACES,"
  312. 11200 PRINT" YOU MAY TYPE "CHR$(34)"2[218]/3"CHR$(34)" MEANING:"
  313. 11250 PRINT"  "CHR$(34)"PUT THE 2[218] ON THE 3RD LINE."CHR$(34)
  314. 11260 PRINT"[209]YOU HAVE SEVERAL TRIES (OR "CHR$(34)"PASSES"CHR$(34)")"
  315. 11300 PRINT"(PRESS SPACE[146] TO CONTINUE)":POKE53280,6
  316. 11400 GETA$:IFA$=""THEN11400
  317. 11500 PRINT"[147]":POKE53280,15:RETURN
  318. 20000 REM***********************
  319. 20001 REM*                     *
  320. 20002 REM* CHECK FOR STALEMATE *
  321. 20003 REM*                     *
  322. 20004 REM***********************
  323. 20005 C1=0
  324. 20010 FORL=1TO4
  325. 20015 IFSJ(L)=0THENL=4:GOTO20040
  326. 20020 IFCN(SI(L),SJ(L)-1)=-1THENC1=C1+1:GOTO20040
  327. 20030 IFCN(SI(L),SJ(L)-1)=11THENC1=C1+1
  328. 20040 NEXT
  329. 20050 IFC1<4THENNQ=0:RETURN
  330. 20060 NQ=1:PASS=PASS+1:RETURN
  331. 20070 PRINT"";:FORL=1TO23:PRINT"";:NEXT:PRINT"           ";
  332. 20080 PRINT"LIKE ANOTHER GAME?[146]       ";
  333. 20090 GETA$
  334. 20100 IFA$=""THEN20090
  335. 20110 IFA$="Y"THENRUN
  336. 20120 END
  337. 21000 REM*********
  338. 21001 REM*       *
  339. 21002 REM* DIRGE *
  340. 21003 REM*       *
  341. 21004 REM*********
  342. 21700 SID=54272:P=SID+1:T=2:POKESID+4,33:POKESID+6,10*16+8:POKESID+24,15
  343. 21725 POKEP,18:FORX=1TO300*T:NEXT:GOSUB21790
  344. 21735 POKEP,18:FORX=1TO200*T:NEXT:GOSUB21790
  345. 21740 POKEP,18:FORX=1TO100*T:NEXT:GOSUB21790
  346. 21742 POKEP,18:FORX=1TO300*T:NEXT:GOSUB21790
  347. 21745 POKEP,21:FORX=1TO300*T:NEXT:GOSUB21790
  348. 21750 POKEP,20:FORX=1TO200*T:NEXT:GOSUB21790
  349. 21755 POKEP,18:FORX=1TO100*T:NEXT:GOSUB21790
  350. 21760 POKEP,18:FORX=1TO200*T:NEXT:GOSUB21790
  351. 21765 POKEP,16:FORX=1TO100*T:NEXT:GOSUB21790
  352. 21770 POKEP,18:FORX=1TO300*T:NEXT
  353. 21790 FORX=1TO5:NEXT:POKEP,0:RETURN
  354. 50000 REM*************
  355. 50001 REM*           *
  356. 50002 REM*   TITLE   *
  357. 50003 REM*           *
  358. 50004 REM*************
  359. 50005 PRINT"[147][144]":POKE53281,15:POKE53280,15:SID=54272
  360. 50010 PRINTSPC(6)" [223][169] [146]    [146]  [146]  [146]    [146]    [146]  [146]  [146]    [146]"
  361. 50015 PRINTSPC(6)" [146][223][169] [146]  [146]  [146]  [146]  [146]   [146]   [146]  [146]  [146]  [146]  [146]  [146]"
  362. 50020 PRINTSPC(6)" [146]   [146]  [146]  [146]  [223] [146]   [146]     [146]  [223] [146]    [146]"
  363. 50030 PRINTSPC(6)" [146]   [146]  [146]  [146]  [146][223] [146]   [146]   [146]  [146]  [146][223] [146]  [146]  [146]"
  364. 50040 PRINTSPC(6)" [146]   [146]    [146]  [146]  [146]   [146]   [146]  [146]  [146]  [146]  [146]  [146]"
  365. 50045 P1$="                    "
  366. 50046 P$="PASS 1 OF"+TT$
  367. 50047 A1$="YOU GOTTA BE KIDDIN'"
  368. 50048 A2$="AW...C'MON NOW!!"
  369. 50049 A3$="WELL..THAT'S AN EASY GAME!"
  370. 50050 A4$="CONGRATULATIONS!"
  371. 50051 FORI=0TO28:POKESID+I,0:NEXT
  372. 50052 POKESID+6,240:POKESID+24,15:POKESID+1,100
  373. 50055 GOSUB63000:GOSUB63700:FORI=0TO10:POKE176,I:GOSUB63820:FORT=1TO50:NEXT
  374. 50060 NEXT:RETURN
  375. 62000 REM* NUMBER OF PASSES? *
  376. 62100 INPUT"HOW MANY TRIES WOULD YOU LIKE   3[157][157][157]";TT$
  377. 62150 PRINT"[147]":PRINT"[144]"
  378. 62200 TT=VAL(TT$)
  379. 62300 IFTT=0THEN62100
  380. 62350 PRINT"[147]":P$=P$+TT$
  381. 62355 IFTT>8THENPRINTA1$:GOTO62370
  382. 62360 IFTT>5THENPRINTA2$:GOTO62370
  383. 62365 IFTT>3THENPRINTA3$:GOTO62370
  384. 62370 FORK=1TO500:NEXT
  385. 62400 PRINT"[147]":RETURN
  386. 62500 REM******************
  387. 62501 REM*                *
  388. 62502 REM*  END OF GAME   *
  389. 62503 REM*                *
  390. 62504 REM******************
  391. 63000 REM* SCREEN FLASH ROUTINE *
  392. 63010 RESTORE:FORMM=832TO869
  393. 63020 READMC:POKEMM,MC:NEXT:RETURN
  394. 63030 :
  395. 63040 DATA 162,0,189,0,4,73,128,157,0,4,189,0,5,73,128,157,0,5,189,0,6,73,128
  396. 63060 DATA 157,0,6,189,0,7,73,128,157,0,7,202,208,221,96
  397. 63130 REM**  A WIN!  **
  398. 63135 IFPASS>4THEN8000
  399. 63140 FORTM=1TO20:SYS832:POKESID+24,15
  400. 63150 POKESID+1,250-12*TM:POKESID+4,17
  401. 63160 FORK=1TO50:NEXT:POKE176,16*RND(1):GOSUB63820
  402. 63170 POKESID+1,0:NEXT
  403. 63180 GOTO20070
  404. 63700 REM ROUTINE AT $7FOO FILLS MEMORY
  405. 63710 REM WITH A PRESCRIBED FILL BYTE.
  406. 63720 REM POKE 174/175,STARTING ADDRESS
  407. 63730 REM POKE 176,FILL BYTE
  408. 63740 REM POKE 177,NUMBER OF PAGES
  409. 63750 REM SYS ML TO FILL MEMORY
  410. 63760 ML=7*4096+15*256:POKE53281,15
  411. 63770 FORI=0TO16:READX:POKEML+I,X:NEXT
  412. 63780 RETURN
  413. 63790 DATA 165,176,166,177,160,0,145,174,200,208,251,230,175,202,208,246,96
  414. 63800 REM FILL MEMORY PAGES
  415. 63810 POKE176,0:REM COLOUR
  416. 63820 POKE174,0:POKE175,216:REM NYBBLES
  417. 63830 POKE177,4:REM PAGES
  418. 63840 SYSML:RETURN
  419.